import React from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Home from '../pages/Home';
import Login from '../pages/Login';
import ColorExtractor from '../pages/ColorExtractor';
import Dashboard from '../pages/Dashboard';
import ButtonStyle from '../pages/ButtonStyle';
import MainColor from '../pages/MainColor';
import TicTacToe from '../pages/TicTacToe';
import Gobang from '../pages/Gobang';
import RubiksCube from '../pages/RubiksCube';
import PrivateRoute from '../components/Auth/PrivateRoute';

const Routes = () => {
    return (
            <Switch>
                <Route path="/" exact component={Home} />              
                <Route path="/login" component={Login} />
                <Route path="/colorExtractor" component={ColorExtractor} />
                <Route path="/buttonStyle" component={ButtonStyle} />
                <Route path="/mainColor" component={MainColor} />
                <Route path="/game/tictactoe" component={TicTacToe} />
                <Route path="/game/gobang" component={Gobang} />
                <Route path="/game/RubiksCube" component={RubiksCube} />
                <PrivateRoute path="/dashboard" component={Dashboard} />
            </Switch>
    );
};

export default Routes;